<html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<head>
    <title>angularJs入门demo，事件指令</title>
    <script src="angular.min.js"></script>
    <script>
        var app = angular.module("myApp",[]);
        app.controller("myController",function ($scope) {
            //相当于是public，但是如果直接外面add2=funciton然后，相当于private
            $scope.add=function () {
                //$符号一看，就是系统提供的
                //然后让表达式等于该值
                $scope.z =  parseInt($scope.x) + parseInt($scope.y);
            }
        })
    </script>
</head>
<body ng-app="myApp" ng-controller="myController">
<button ng-click="add()">运算</button>
运算结果：{{z}}
</body>
</html>